/**
 * 
 */
package com.redside.webapp.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import com.redside.service.BusinessManager;


/**
 * @author PCHAPMAN
 *
 */
public class BusinessAssociatorListController implements Controller {
    private final Log logger = LogFactory.getLog(BusinessAssociatorListController.class);

    private BusinessManager businessManager;

    public void setBusinessManager(BusinessManager businessManager) {
        this.businessManager = businessManager;
    }

    public ModelAndView handleRequest(HttpServletRequest req, HttpServletResponse resp)
            throws Exception {
        logger.debug("handling the request...");
        return new ModelAndView().addObject(businessManager.getAll());
    }
}
